﻿using System;

namespace SeleniumToolkit
{
    /// <summary>
    /// Marks a method as a WebTest
    /// </summary>
    [AttributeUsage(AttributeTargets.Method)]
    public class WebTestAttribute : Attribute
    {
        #region Constructors
        /// <summary>
        /// Use default settings
        /// </summary>
        public WebTestAttribute()
        {
        }

        /// <summary>
        /// Use a specific browser string
        /// </summary>
        /// <param name="seleniumBrowserProfile"></param>
        public WebTestAttribute(string seleniumBrowserProfile)
        {
            DefaultBrowser = seleniumBrowserProfile;
        }

        /// <summary>
        /// Use a specific browser string and starting url
        /// </summary>
        /// <param name="seleniumBrowserProfile"></param>
        /// <param name="baseUrl"></param>
        public WebTestAttribute(string seleniumBrowserProfile, string baseUrl)
        {
            DefaultBrowser = seleniumBrowserProfile;
            BaseUrl = baseUrl;
        } 
        #endregion

        #region Properties
        /// <summary>
        /// Selenium Browser string for this test
        /// </summary>
        public string DefaultBrowser
        {
            get;
            set;
        }

        /// <summary>
        /// Starting URL for this test
        /// </summary>
        public string BaseUrl
        {
            get;
            set;
        }

        /// <summary>
        /// Default timeout for this test
        /// </summary>
        public int Timeout
        {
            get;
            set;
        } 
        #endregion
    }
}
